# see https://gqgh5wfgzt.github.io/benchmark-leapfrog/
# sudo apt-get update
# sudo apt-get install mvn git

git clone https://github.com/GQgH5wFgzT/benchmark-leapfrog.git
wget https://downloads.apache.org/jena/binaries/apache-jena-3.16.0.tar.gz
tar -xf apache-jena-3.16.0.tar.gz
cd apache-jena-3.16.0

emacs bin/tdbloader2index
# add the following lines for the 
#  LTJ experiments
generate_index "$K1 $K3 $K2" "$DATA_TRIPLES" SOP
generate_index "$K2 $K1 $K3" "$DATA_TRIPLES" PSO
generate_index "$K3 $K2 $K1" "$DATA_TRIPLES" OPS

# be sure to set TMPDIR to existing folder with lots of space
# export TMPDIR=~/tmp
bin/tdbloader2 --loc=../db/wd ../wikidata.nt 

cd ..

git clone https://github.com/GQgH5wFgzT/jena.git jenaltj
mvn clean install -Drat.numUnapprovedLicenses=100 -Darguments="-Dmaven.javadoc.skip=true" -DskipTests
cp apache-jena/target/apache-jena-3.10.0.tar.gz ../
cd ..
tar -xf apache-jena-3.10.0.tar.gz

# note that the same indexes can be used for Jena and JenaLTJ
#  though the three additional indexes added above are not necessary for Jena